home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpinstall / nsISoftwareUpdate.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  106 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is Mozilla Communicator client code, released
  16.  * March 31, 1998.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications Corporation.
  20.  * Portions created by the Initial Developer are Copyright (C) 1998
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Daniel Veditz <dveditz@netscape.com>
  25.  *   Douglas Turner <dougt@netscape.com>
  26.  *
  27.  * Alternatively, the contents of this file may be used under the terms of
  28.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  29.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  30.  * in which case the provisions of the GPL or the LGPL are applicable instead
  31.  * of those above. If you wish to allow use of your version of this file only
  32.  * under the terms of either the GPL or the LGPL, and not to allow others to
  33.  * use your version of this file under the terms of the MPL, indicate your
  34.  * decision by deleting the provisions above and replace them with the notice
  35.  * and other provisions required by the GPL or the LGPL. If you do not delete
  36.  * the provisions above, a recipient may use your version of this file under
  37.  * the terms of any one of the MPL, the GPL or the LGPL.
  38.  *
  39.  * ***** END LICENSE BLOCK ***** */
  40.  
  41. #ifndef nsISoftwareUpdate_h__
  42. #define nsISoftwareUpdate_h__
  43.  
  44. #include "nsISupports.h"
  45. #include "nsIFactory.h"
  46.  
  47. #include "nsIXPINotifier.h"
  48. #include "nsCOMPtr.h"
  49. #include "nsIModule.h"
  50. #include "nsIGenericFactory.h"
  51. #include "nsILocalFile.h"
  52. #include "nsDirectoryServiceUtils.h"
  53. #include "nsDirectoryServiceDefs.h"
  54.  
  55. #define NS_IXPINSTALLCOMPONENT_CONTRACTID  "@mozilla.org/xpinstall;1"
  56. #define NS_IXPINSTALLCOMPONENT_CLASSNAME "Mozilla XPInstall Component"
  57.  
  58. #define XPINSTALL_ENABLE_PREF            "xpinstall.enabled"
  59. #define XPINSTALL_WHITELIST_ADD          "xpinstall.whitelist.add"
  60. #define XPINSTALL_WHITELIST_ADD_103      "xpinstall.whitelist.add.103"
  61. #define XPINSTALL_WHITELIST_REQUIRED     "xpinstall.whitelist.required"
  62. #define XPINSTALL_BLACKLIST_ADD          "xpinstall.blacklist.add"
  63.  
  64.  
  65. #define XPI_NO_NEW_THREAD   0x1000
  66.  
  67. #define NS_ISOFTWAREUPDATE_IID                   \
  68. { 0x18c2f992,                                      \
  69.   0xb09f,                                          \
  70.   0x11d2,                                         \
  71.  {0xbc, 0xde, 0x00, 0x80, 0x5f, 0x0e, 0x13, 0x53}\
  72. }
  73.  
  74. class nsIPrincipal;
  75.  
  76. class nsISoftwareUpdate : public nsISupports
  77. {
  78.     public:
  79.             NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISOFTWAREUPDATE_IID)
  80.  
  81.             NS_IMETHOD InstallJar(nsIFile* localFile,
  82.                                   const PRUnichar* URL,
  83.                                   const PRUnichar* arguments,
  84.                                   nsIPrincipal* aPrincipalDisplayed,
  85.                                   PRUint32 flags,
  86.                                   nsIXPIListener* aListener = 0) = 0;
  87.  
  88.             NS_IMETHOD InstallChrome(PRUint32 aType,
  89.                                      nsIFile* aFile,
  90.                                      const PRUnichar* URL,
  91.                                      const PRUnichar* aName,
  92.                                      PRBool aSelect,
  93.                                      nsIXPIListener* aListener = 0) = 0;
  94.  
  95.             NS_IMETHOD RegisterListener(nsIXPIListener *aListener) = 0;
  96.  
  97.             /* FIX: these should be in a private interface */
  98.             NS_IMETHOD InstallJarCallBack()                   = 0;
  99.             NS_IMETHOD GetMasterListener(nsIXPIListener **aListener) = 0;
  100.             NS_IMETHOD SetActiveListener(nsIXPIListener *aListener) = 0;
  101. };
  102.  
  103.  
  104. #endif // nsISoftwareUpdate_h__
  105.  
  106.